package com.gitee.shigen.security.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gitee.shigen.security.common.PermissionTypeEnum;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 权限表
 * </p>
 *
 * @author shigenfu
 * @since 2024-01-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_permission")
public class Permission implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 接口权限名称
     */
    private String name;

    /**
     * 接口路径
     */
    private String url;
    /**
     * 权限类型，页面-PAGE，按钮-BUTTON
     *
     * @see PermissionTypeEnum
     */
    private String type;

    /**
     * 权限表达式
     */
    private String expression;

    /**
     * GET，POST，PUT，DELETE等
     */
    private String method;

    private LocalDateTime createTime;

    private LocalDateTime updateTime;


}
